﻿#pragma once

#include <string>
#include <hadoop/TaskContext.h>

namespace HadoopPipes {
  
  class UpwardProtocol {
  public:
    virtual void output(const std::string& key, const std::string& value) = 0;
    virtual void partitionedOutput(int reduce, const std::string& key,
                                   const std::string& value) = 0;
    virtual void status(const std::string& message) = 0;
    virtual void progress(float progress) = 0;
    virtual void done() = 0;
    virtual void registerCounter(int id, const std::string& group, 
                                 const std::string& name) = 0;
    virtual void 
      incrementCounter(const TaskContext::Counter* counter, uint64_t amount) = 0;
    virtual ~UpwardProtocol() {}
  };
}